<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./vue.js"></script>
</head>

<body>
  <div id="app">
    <template v-if="isShow">
      <h1 >太原2001</h1>
      <ul >
        <li>duanpeng</li>
      </ul>
    </template>
    <hr>

    <h1 v-show="isShow">hellworld</h1>

    <!-- <div v-if="tag==='a'">a</div>
    <div v-else-if="tag==='b'">b</div>
    <div v-else>c</div> -->


    <!-- <template v-if="loginType === 'username'">
      <label>Username</label>
      <input key="username" placeholder="Enter your username">
    </template>
    <template v-else>
      <label>Email</label>
      <input key="email" placeholder="Enter your email address">
    </template>
   
    <button @click="handleToggle">toggle</button> -->
  </div>
  <script>

    var vm = new Vue({
      el: "#app",
      data: {
        loginType:"username",
        isShow: true,
        tag:"a"
      },
      methods:{
        handleToggle(){
          this.loginType= this.loginType==='username'?'':'username'
        }
      }
    })

  </script>
</body>

</html>